package com.esyoga.yoyoga.handler;

import com.esyoga.yoyoga.pojo.TOrder;
import com.esyoga.yoyoga.service.StudentOrderService;
import lombok.Data;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Data
@Controller
@RequestMapping("/myCentre")
public class StudentOrderHandler {
    @Resource
   private StudentOrderService studentOrderService;

    @RequestMapping("/Order")
    @ResponseBody
    public List<TOrder> allOrder(Integer sId) {

        return  studentOrderService.allOrder(sId);

    }
}
